package com.gwl.circle.api.provider;

import com.gwl.circle.api.config.OpenFeignConfig;
import com.gwl.circle.common.bo.UserAddBo;
import com.gwl.circle.common.bo.UserLoginBo;
import com.gwl.circle.common.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author 高万里
 */
@FeignClient(value = "gwl-userserver", configuration = OpenFeignConfig.class)
public interface UserProvider {

    @PostMapping("/server/user/register")
    R register(@RequestBody UserAddBo bo);

    @PostMapping("/server/user/login")
    R login(@RequestBody UserLoginBo bo);

    @GetMapping("/server/user/all")
    R all();

    @GetMapping("/server/user/growthRecord")
    public R growthRecord();

    @GetMapping("/server/user/logout")
    public R logout();
}
